#import "UpliftUnfoldCell.h"


@implementation UpliftUnfoldCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {

		self.selectionStyle = UITableViewCellSelectionStyleNone;
		//self.contentView.backgroundColor = UIColor.whiteColor;

		//: 初始化UI布局
		[self braveSubViews];
	}
	return self;
}

- (void)setMingleIntrepidWisp:(UpliftUnfoldModel *)mingleIntrepidWisp {
	_mingleIntrepidWisp = mingleIntrepidWisp;

	//: 配置cell的UI



	if (mingleIntrepidWisp.infinite.count > 0) {
		[self.brightenAbandonImageView sd_setImageWithURL:[NSURL URLWithString:mingleIntrepidWisp.infinite[0]] placeholderImage:nil];
	}

}
- (UIView *)elusiveView {
	if (!_elusiveView) {
	
        _elusiveView = [UIView new];
        _elusiveView.frame = CGRectMake(47, 43, 156, 102);
	}
	return _elusiveView;
}

- (UITextField *)onyxTextField {
	if (!_onyxTextField) {
	
        _onyxTextField = [UITextField new];
        _onyxTextField.frame = CGRectMake(5, 39, 138, 35);
	}
	return _onyxTextField;
}

//: transformUnveilDazzle 的点击事件
- (void)action_6 {}

- (void)braveSubViews {

    //: 描述_0
    self.quiverDriftwoodTextView = [[UITextView alloc] init];
    self.quiverDriftwoodTextView.frame = CGRectMake(25, 37, 51, 37);
    [self.contentView addSubview:self.quiverDriftwoodTextView];

	//: 描述_1
	[self.contentView addSubview:self.elusiveView];


    //: 描述_2
    self.archiveImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
    self.archiveImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.archiveImageView.clipsToBounds = YES;
    self.archiveImageView.layer.cornerRadius = 19;
    self.archiveImageView.layer.masksToBounds = YES;
    UIImage *motionWispFeast = [UIImage imageNamed:@"images/image_2.png"];
    if (motionWispFeast) {
	    self.archiveImageView.image = motionWispFeast;
    }
    [self.contentView addSubview:self.archiveImageView];
	[self.archiveImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(91);
		make.height.mas_equalTo(84);
		make.top.equalTo(@(14));
		make.bottom.equalTo(@(27));
	}];


    //: 描述_3
    UIImageView *kaleidoscopeBreezeFlourish = [[UIImageView alloc] initWithFrame:CGRectZero];
    kaleidoscopeBreezeFlourish.contentMode = UIViewContentModeScaleAspectFill;
    kaleidoscopeBreezeFlourish.clipsToBounds = YES;
    kaleidoscopeBreezeFlourish.layer.cornerRadius = 20;
    kaleidoscopeBreezeFlourish.layer.masksToBounds = YES;
    UIImage *juggle = [UIImage imageNamed:@"images/image_3.png"];
    if (juggle) {
	    kaleidoscopeBreezeFlourish.image = juggle;
    }
    self.brightenAbandonImageView = kaleidoscopeBreezeFlourish;
    [self.contentView addSubview:kaleidoscopeBreezeFlourish];
	[self.brightenAbandonImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(61);
		make.height.mas_equalTo(196);
	}];


    //: 描述_4
    self.fableWanderNomadLabel = [UILabel new];
    self.fableWanderNomadLabel.size = CGSizeMake(70, 139);
    self.fableWanderNomadLabel.left = 17;
    self.fableWanderNomadLabel.top = 30;
    self.fableWanderNomadLabel.text = @"label_4";
    self.fableWanderNomadLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightMedium];
    self.fableWanderNomadLabel.textColor = [UIColor colorWithRed:180/255.0 green:87/255.0 blue:23/255.0 alpha:0.6];
    self.fableWanderNomadLabel.textAlignment = NSTextAlignmentLeft;
    self.fableWanderNomadLabel.numberOfLines = 3;
    [self.contentView addSubview:self.fableWanderNomadLabel];

	//: 描述_5
	[self.contentView addSubview:self.onyxTextField];


    //: 描述_6
    UIButton *transformUnveilDazzle = [UIButton new];
    transformUnveilDazzle.size = CGSizeMake(39, 99);
    transformUnveilDazzle.left = 7;
    transformUnveilDazzle.top = 12;
    UIImage *glimmerElevateKingdom = [UIImage imageNamed:@"images/icon_6.png"];
    if (glimmerElevateKingdom) {
	    [transformUnveilDazzle setImage:glimmerElevateKingdom forState:UIControlStateNormal];
    }
    [transformUnveilDazzle setTitle:@"button_6" forState:UIControlStateNormal];
    [transformUnveilDazzle setTitle:@"button_selected_6" forState:UIControlStateSelected];
    [transformUnveilDazzle setTitleColor:[UIColor colorWithRed:177/255.0 green:32/255.0 blue:45/255.0 alpha:0.8] forState:UIControlStateNormal];
    [transformUnveilDazzle setTitleColor:[UIColor colorWithRed:53/255.0 green:177/255.0 blue:214/255.0 alpha:0.7] forState:UIControlStateSelected];
    [transformUnveilDazzle addTarget:self action:@selector(action_6) forControlEvents:UIControlEventTouchUpInside];
    self.forestGrinButton = transformUnveilDazzle;
    [self.contentView addSubview:transformUnveilDazzle];
}


@end